#include<iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <set>
#include <map>
using namespace std;
class Solution {
public:
    double myPow(double x, int n) {
        double ans = 1;
        bool pd = n > 0;
        while (n)
        {
            if (n % 2)ans *= x;
            x *= x;
            n /= 2;
        }
        return pd ? ans : 1 / ans;
    }
};
int main()
{
    Solution s;

}